package main

import "fmt"

/*
  一个结构体实现多个接口
*/

type Animal interface {
	Move()
}

type People interface {
	Learn()
}

type Man interface {
	Work()
}

type Student struct {
	Name string
}

func (s Student) Move() {
	fmt.Println(s.Name, "is move")
}

func (s Student) Learn() {
	fmt.Println(s.Name, "is learn")
}

func (s Student) Work() {
	fmt.Println(s.Name, "is work")
}

func main() {
	s := Student{Name: "Tom"}
	var (
		animal Animal
		people People
		man    Man
	)
	animal = s
	people = s
	man = s
	fmt.Println("-----animal-----")
	animal.Move()
	fmt.Println("-----people-----")
	people.Learn()
	fmt.Println("-----man-----")
	man.Work()

}
